package 多线程.Threadpool;

/**
 * @ClassName b
 * @since: 2023/9/13 15:02
 * @auth: kirito
 * @description:
 **/

public class MyRunnable  implements Runnable{

    @Override
    public void run() {
        for (int i = 1; i <= 5; i++) {
            final String name = Thread.currentThread().getName();
            System.out.println(name + " 执行了：HelloWorld==>"+i);
        }

        try {
            System.out.println(Thread.currentThread().getName()+"---睡眠了");
            Thread.sleep(10000000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}